#ifndef GRAPHVIEWER_H
#define GRAPHVIEWER_H

#include <QtGui/QWidget>
#include <QLayout>
#include <QLabel>
#include <QPushButton>
#include <QTextEdit>
#include <QLineEdit>
#include <QGroupBox>
#include <QMessageBox>
#include <QFileDialog>
#include <QFile>
#include <QDebug>
#include <graphmodelslist.h>
#include <graphmodel.h>
#include <graphtextview.h>
#include <graphvisualview.h>

class GraphViewer : public QWidget
{
    Q_OBJECT

    GraphModelsList Graphs;

    GraphTextView *textViewWindow;
    GraphVisualView *visualViewWindow;

    QPushButton *buttonReadText;
    QPushButton *buttonView1;
    QPushButton *buttonView2;
    QPushButton *buttonReadFile;
    QPushButton *buttonWriteFile;

    QTextEdit *textInputMatrix;
    QLineEdit *textInputFile;
    QLineEdit *textOutputFile;

    void InitWindow();
    void InitSignalSlots();

public:
    GraphViewer(QWidget *parent = 0);
    ~GraphViewer();

public slots:
    void GetGraphModelFromTextEdit();
    void FillTextEditFromFile();
    void SaveGraphsToFile();
    void OpenTextViewWindow();
    void OpenVisualViewWindow();

};

#endif // GRAPHVIEWER_H
